package com.tuanzi.loan.web.lazy.xhh.settlementsystem;

import com.tuanzi.loan.business.service.xhh.settlementsystem.XhhSettlementIncomeService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.xhh.settlementsystem.XhhSettlementIncomeRequest;
import com.tuanzi.loan.vo.response.xhh.settlementsystem.XhhSettlementIncomeResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-08-20 14:07
 */
public class XhhSettlementIncomeLazyDataModel extends BaseLazyDataModel<XhhSettlementIncomeRequest, XhhSettlementIncomeResponse> {
    private XhhSettlementIncomeService xhhSettlementIncomeService = SpringContextHolder.getBean(XhhSettlementIncomeService.class);
    public XhhSettlementIncomeLazyDataModel(XhhSettlementIncomeRequest settlementIncomeRequest) {
        super(settlementIncomeRequest);
    }
    @Override
    protected Page<XhhSettlementIncomeResponse> doLoad(PageSearcher<XhhSettlementIncomeRequest> pageSearcher) {
        return xhhSettlementIncomeService.list(pageSearcher);
    }
}